package com.group.chat.config;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * author: lida
 * create time: 2020-10-16 22:37
 * description: 
 */
@SpringBootConfiguration
public class WebSocketConfig {

    //  注入对象 ServerEndpointExporter，这个 bean 会自动注册
    //  使用了 @ServerEndpoint 注解声明的 Websocket endpoint
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
